// 操作日志路由
import { Router } from 'express';
import operLogController from '@/controllers/monitor/operLog.controller';
import { authMiddleware } from '@/middlewares/auth.middleware';
import { permissionMiddleware } from '@/middlewares/permission.middleware';

const router = Router();

/**
 * 操作日志监控路由
 * 路径前缀：/monitor/operLog
 */

// ================== 操作日志相关 ==================

// 所有路由均需认证
router.use(authMiddleware);

// 查询操作日志列表
router.get('/list', permissionMiddleware('monitor:operlog:list'), operLogController.list);

// 导出操作日志
router.post('/export', permissionMiddleware('monitor:operlog:export'), operLogController.export);

// 清空操作日志
router.delete('/clean', permissionMiddleware('monitor:operlog:remove'), operLogController.clean);

// 删除操作日志
router.delete('/:operIds', permissionMiddleware('monitor:operlog:remove'), operLogController.remove);

// 获取操作日志详细信息
router.get('/:operId', permissionMiddleware('monitor:operlog:query'), operLogController.getInfo);

export default router; 